package com.itheima.chapter01.array;
/*
    数组最大、最小值
 */
public class demo2 {
    public static void main(String[] args) {
        int[] arr={11,23,34,35,36,5456,68,67,78,57,59,98,87,56,32};
        int max=arr[0];
        int min=arr[0];
        for (int i = 1; i <arr.length ; i++) {
            if(max<arr[i]){
                max=arr[i];
            }
            if(min>arr[i]){
                min=arr[i];
            }
        }
        System.out.println("数组的最大值是："+max);
        System.out.println("数组的最小值是："+min);
    }
}
